Object Control Properties

The Object Control Properties editor is used to set your choice of properties (i.e. parameters) for each Knowledge Explorer object. Depending on the Base Class settings of the Object, different properties will be shown. This section details all the possible properties that can be seen when User option Show Advanced Properties is set (and the properties are enabled at the Base Class)

See also the section on Making references to properties on how to access Object Control properties dynamically at run time.

description

The description property is an optional string and can be used for the developer's own documentation purposes.

It can also be used as an alternative run time text by setting the questionTextPrompt to use this description in place of the default name of the object in the Knowledge Explorer. In the absence of an attribute (or similar variable) not being captured via a developer designed dialog, XpertRule will display a basic user default dialog created automatically. The Display - questionTextPrompt property specifies what question text is to be displayed to the run time on this default dialog.

Format

decPlaces

This integer property for numeric attributes can be used to specify the number of decimal places.

multiSelect

By default, List Attributes are set for a single value selection. However, they can be set to handle multiple values being selected by changing the multiSelect property to true.

For example, the list attribute called Color, with values Red, Green, Blue, where the run time user can select one, two or all three values.

When you capture a list attribute via a user dialog you can also impose further control over the maximum and minimum number of items that the user can select by using the MultiSelMax and MultiSelMin properties of List box controls.

When the multiSelect property is set, the object's icon will have an extra small green dot below it, as this example for a List attribute icon shows.

Note that values can be assigned to multi select list objects using @Assign and placing the values in square brackets, for example:

@Assign myList = []
@Assign myList = ['c']
@Assign myList = myList + ['b']
@Assign myList = myList - ['c']
@Assign myList = ['a','d']

The selected values of a multi select list object can also be scanned:

@For index = 1 to myList.nValues
  @If myList.selected[index] = True
     @Debug myList.ItemName[index]
  @Endif
@Next
Default

default

This property sets the default value to be used. Note that the defaultMode property must also be set for this to take effect.

Setting a default value is not the same as assigning a value to the object. At run time, the inference process will still seek a value for this object. The default setting simply enables a pre-selected value to be offered to the run time user via dialog controls.

defaultMode

This property determines whether the default value is to be used. This is a more flexible mechanism to enable/disable default values without needing to clear/enter the default property.

SetDefault is the same as assigning a value to the object.

UseDefault is not the same as assigning a value to the object. At run time, the inference process will still seek a value for this object. The default setting simply enables a pre-selected value to be offered to the run time user via dialog controls.

Knowledge

The object's icon will have an extra small red above it (as this example for a List attribute's icon shows) to denote that the object has knowledge, when either of the hasCases or the hasTree properties are set.

hasCases

Setting this knowledge property would enable this Cases editor tab page.

See the section on Cases.

hasEvents

Setting the hasEvents property would enable this Events editor tab page.

Each object can have several events that can be invoked at different points of run time execution. See the section on Events.

hasTree

Setting the hasTree property would enable this Decision tree editor tab page.

See the section on Decision Trees.

knowledgeMode

The selections available for the KnowledgeMode property depend on whether you are using the Cases (i.e. hasCases = true) and/or the Decision Tree (i.e. hasTree = true) with this object. Because you can use both Cases and Trees at the same time (when you want to induce trees from cases) the knowledgeMode property specifies which one of these is to provide the knowledge at run time.

Note that the Inference properties in the following topic then provide more detailed control over how the inference process is then applied to that particular knowledgeMode.

Cases: Use table of cases. See the section on Using Inference from Cases.

Tree: Use the Decision tree. See the section on Decision Trees.

<none>: No knowledge is to be used. While this is the default setting when you are use neither Cases nor a Tree, it can also be useful to disable the application of knowledge for this object yet still retain the Cases or Tree.

Inference

isDynamic

By default, once the run time has obtained a value for an attribute it will not request the value again when the inference process encounters the attribute the next time (e.g. later in any decision tree). Changing the isDynamic status to true has the effect of setting the attribute status permanently to 'evaluate every time'. The inference process will then always request the value of this dynamic attribute. This type of attribute is often referred to as a 'non sticky' or 'value can change' attribute. Any procedural commands tied to the dynamic attribute would also be executed every time the attribute is encountered in the logic.

Embed/Display values within text.

isPause

The isPause property causes the run time server to wait for a client application to supply the value in pause_ident_string via the PauseEvent method.

selectionMode

The selectionMode property sets the method to be used for inference for the object.

Decision uses the Decision Tree or the Cases table and is dependant on the setting of the knowledgeMode property.

tiedFwdTask

This is a legacy property that will only appear if you are using an older application file which has been converted from XpertRule release 3, and Project Tools - Project Options - Show Legacy is enabled.

Display

allowBlank

When set to true, the allowBlank property allows the run time value to be blank. i.e. user entry is not obligatory. This property applies to objects where the multiSelect property is set to False, for objects where the multiSelect property is set to True then the allowBlank property has no effect.

inputMask

The inputMask property is used to control the runtime data entry for Text objects. The mask is defined as follows;

isEnabled

When the isEnabled property is set to true the value can be changed at run time.

isVisible

The isVisible property must be set to true for the object to be visible to the run time user.

maxValue/minValue

The minValue and maxValue properties are used (JavaScript Web Deployment only) to validate the values of numeric Attributes captured on a Dialog. This validation check is triggered when the focus is moved away from the control (e.g. pressing the Tab key or clicking on a Button control). This validation check is only triggered if;

minValue < maxValue

any existing user-defined control "validation" returns a valid status

If the entered Attribute value falls outside this min/max range then the control's border is highlighted, the valid range is displayed to the right of the control and the normal Dialog exit (e.g. when clicking an OK button) is prevented.

The minValue & maxValue properties are also used (JavaScript Web Deployment only) to restrict the range of values of Date Attributes captured on a Dialog.

If the Date Attribute is typed-in directly and this value falls outside the min/max range then the control's border is highlighted and the normal Dialog exit (e.g. when clicking an OK button) is prevented.

The following example sets the minValue & maxValue properties to restrict the Calender date range to 1 week from today's date:

@Dim x:N
@Date Start_Date
@Assign Date_Attribute.minValue = Start_Date
@Assign x = End_Date + 7
@Assign End_Date = x
@Assign Date_Attribute.maxValue = End_Date

where Date_Attribute, Start_Date & End_Date are all Objects of type "Date"

questionTextPrompt

In the absence of an attribute (or similar variable) not being captured via a developer designed dialog, XpertRule will display a basic user default dialog created automatically. The questionTextPrompt specifies what question text is to be displayed to the run time on this dialog. Most string type properties should be available for use as the prompt, the most commonly used is the text in the description property.

sortDirection

The sortDirection property works in conjunction with the sortProperty display property. If sortProperty is set to an instance property of type LIST or STRING (e.g. set to "ItemName" if you wish to sort the instances by the first column), then the sortDirection sorts the instances of the object alphabetically in Ascending or Descending order.

sortProperty

The sortProperty can be used to specify which property/field item is to be used to sort lists. It is typically most useful with additional items added to the Instance Properties. For example, when you add a cost value to a List Attribute, you could sort the List of value for lowest cost. Only applicable to grid controls.

tiedDialog

A dialog object can be tied to the attribute by using this tiedDialog property. See the section on Dialogs and the section on Using tied objects.

tiedReport

A report object can be tied to the attribute by using this tiedReport property. See the section on Reports and the section on Using tied objects.

Database

These database properties can be used to set the update modes from an 'ODBC' compliant database table. This can be used to bring in attribute values, along with any additional property columns that you have created on the instances window.

caseDBmode

This property specifies the method of connection when updating Cases from an external database table.

(None): disables the connection

Cut: will connect to the database and update the data immediately before a deploy of the application is generated for distribution.

Live: will connect to the database at run time to update the data.

Manual: will leave it to the developer to use the Import from database tool to update the data on a manual basis.

extendInstances

The extendInstances property specifies if Cases are allowed to be extended with new values during update from an external database table. If a new/unknown value is encountered in the database (i.e. one that you have not included within the definition of the List attributes within your Cases) then this allows it to be added.

Note that this works by you setting the extendInstances property for each List attribute object to allow its values to be extended. It does not work just by setting the property for the object that holds the table of Cases.

instanceDBmode

When updating Instance Properties from an external database table, this property specifies the method of connection when used for Attribute Values, etc.

(None): disables the connection

Cut: will connect to the database and update the data immediately before a deploy of the application is generated for distribution.

Live: will connect to the database at run time to update the data.

Manual: will leave it to the developer to use the Import from database tool to update the data on a manual basis.

Other (not shown by the editor)

XMLstatus

The XMLstatus property is a special Object Control Property which can be accessed at runtime for validating input data and is primarily for use in a Decision Tree split.

It has 3 pre-defined values (Valid, Invalid and Empty). This property is available in all the basic types of Objects (List, Numeric, Date & Boolean). To add this property as a Tree split, highlight its parent Object on the Knowledge Explorer pane then click the right-mouse button and drag to the Decision Tree Editor.

The runtime value of this property is automatically set when runtime value of its Object is set through a call to the 'GoXML' method of the runtime server (XRServer or the Java XML Wrapper). See XML help.

Alternatively, the value of this property can also be set at runtime from within the application using the @XMLset command and passing it an XML string with the Object name and value.

This property value is set to 'Empty' by default. For List and Boolean Objects, it is set to 'Valid' if the Object runtime value is one of the pre-defined list of values for that Object. For Numeric & Date Objects, it is set to 'Valid' if the value is a valid number/date otherwise it is set to 'Invalid'.